import axios from "axios"
import vue from '../main'


var request = axios.create({ timeout: 5000 })

request.interceptors.request.use(function (config) {
    if (vue.$store.state.token) {
        config.headers.token = vue.$store.state.token
    }
    return config;
}, function (error) {
    console.log(error)
});

export default request